import request from '@/utils/request';
import downloader from '@/utils/downloader';
//下载模板
export function downloadTemplate(data) {
  return downloader({
    url: '/admin/appointmentUser/download',
    method: 'get',
    params: data,
  });
}//导出系统用户
export function adminUserExport(data) {
  return downloader({
    // /admin/user/adminUser/adminUserExport
    url: '/admin/appointmentUser/userExport',
    method: 'get',
    params: data,
  });
}
//用户分页列表
export function userListd(data) {
  return request({
    // admin/user/adminUser/adminUserList
    url: '/admin/appointmentUser/userList',
    method: 'get',
    params: data,
  });
}
//批量导入用户
export function importUser(data) {
  return request({
    url: '/admin/appointmentUser/importUser',
    method: 'post',
    data,
  });
}
//删除用户
export function UserRemove(data) {
  return request({
    url: '/admin/appointmentUser/userRemove',
    method: 'DELETE',
    params: data,
  });
}

//添加用户
export function UserSave(data) {
  return request({
    //  /admin/user/adminUser/adminUserSave
    url: '/admin/appointmentUser/userSave',
    method: 'post',
    data,
  });
}
//修改用户
export function UserUpdate(data) {
  return request({
    url: '/admin/appointmentUser/userUpdate',
    method: 'post',
    data,
  });
}
//重置用户密码
export function resetPassword(data) {
  return request({
    url: '/admin/appointmentUser/resetPassword',
    method: 'PUT',
    params: data,
  });
}
// 重置用户信用分
export function resetCredit(data) {
  return request({
    url: '/admin/credit/restore',
    method: 'GET',
    params: data,
  });
}
// 用户预约记录查询

export function appointmentNumber(data) {
  return request({
    url: '/admin/appointment/room/appointmentNumber',
    method: 'get',
   params: data,
  });
}
// 用户预约记录查询

export function creditList(data) {
  return request({
    url: '/admin/credit/list',
    method: 'get',
   params: data,
  });
}
